<!DOCTYPE htmHTML>
<html>
	<head>
		<title>清除浮动</title>
	</head>
	<style type="text/css">
		.parent{
			width: 400px;
			
			background: darkblue;
		}
		.left{
			width: 100px;
			height: 100px;
			background: darkcyan;
			float: left;
		}
			.right{
			width: 100px;
			height: 100px;
			background: darkgoldenrod;
			float: right;
		}
		.parent:after{
			content:"";
			display: block;
			height: 0;
			clear: both;
		}
		.parent{
			zoom: 1;
		}
	</style>
	<body>
		<div class="parent">
			<div class="right"></div>
			<div class="left"></div>
		</div>
	</body>
</html>